
import com.context.AppContext;
import com.context.conexion.EnahoConexion;
import com.context.job.CargaAutomaticaJob;
import java.io.File;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import util.date.DateUtil;
import util.generic.GenericUtil;
import util.StringUtil;
import util.file.FileUtil;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Rdelacruz
 */
public class Test {
    
    
    
    public static void main(String args[]) {
        
    String s = null;
        s = "";
        s=s.concat("abc");
        System.out.println(s);
        
        
        
        Object v = s;
        
        
        System.out.println(s instanceof String);
        
        
        try {
            
            /*
            //Probando si se guarda toda la data XML
            Connection con = null;
            Statement st = null;
            try {
                con = EnahoConexion.getConexion();
                st = con.createStatement();
                ResultSet rs = st.executeQuery("select * from Envios_logxmltransferidos where id_envio='212'");
                
                if(rs.next()) {
                    FileUtil.escribirArchivo("d:/prueba.xml", rs.getString("xml_data"));
                }
            }
            finally {
                if(con!=null) con.close();
                if(st!=null) st.close();
            }
            
            
            String s = "abc ' def";
            System.out.println(s.replace("'", "''"));
            */
            
            //AppContext app = AppContext.getInstancia();
            //File fileLog = new File(app.getEnahoProperties().getDirectorio_upload(), "carga_automatica.txt");
            //MiLogger logger = MiLogger.getLogger(fileLog);
            
            //TablaXml<HogarXml> t = new TablaXml<HogarXml>(HogarXml.class);
            //Object obj = GenericUtil.newInstanciaParametroGenericSuperClass(TablaXml.Derivada.class);
            //Object obj = t.newInstance();
            //System.out.println("obj="+obj);
            
            
            //GenericUtil.test();
            
            /*
            Columna c1 = new Columna();
            Columna c2 = new Columna();
            System.out.println(c1.hashCode());
            System.out.println(c2.hashCode());
            
            System.out.println(Enaho01.CAP_100.hashCode());
            System.out.println(Enaho01.CAP_100.hashCode());
            System.out.println(Enaho01.CAP_100A.hashCode());
            System.out.println(Enaho01A.CAP_300.hashCode());
            
            System.out.println(Enaho01A.CAP_300.getClass());
            System.out.println(Enaho01A.CAP_300.getDeclaringClass());
            System.out.println(Enaho01A.CAP_300.getClass().getName());
            System.out.println(Enaho01A.CAP_300.getClass().getSimpleName());
            */
            
            /*
            Map<String,String> map = new HashMap<>();
            map.put("1", "1");
            map.put("2", "2");
            map.put("3", "3");
            map.put("4", "4");
            map.put("5", "5");
            
            for(Map.Entry<String,String> e: map.entrySet()) {
            System.out.println(e.getValue());
            }
            
            List<String> lista = new ArrayList<>(map.values());
            System.out.println(lista);
            System.out.println(map.keySet());
            */
            //for(Enaho01 e : Enaho01.values()) {
            //    System.out.println("e="+e.name());
            //}
            
            /*
            UsuarioController c = AppContext.getInstancia().getControllerContext().getUsuarioController();
            UsuarioService s = (UsuarioService) c.getService();
            try {
            System.out.println(s.acceso_sistema("abc", "abc"));
            } catch (Exception ex) {
            Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);
            }
            */
            
            Boolean b = null;
            Object obj = b;
            if(obj instanceof Boolean)
                System.out.println("si");
            
        } catch (Exception ex) {
            ex.printStackTrace();
        } 
    }
    
   
}
